<?php

/**
* Fetch global header
* And check the status if it is valid
* where STATUS = _NOT_ACTIVE
*
*/
$CLFetchers->fetchLstDataHeader($Db,
                                $jobId,
                                $SourceDb,
                                $nHeader,
                                $lstHeader);

/**
* Init the detail
*
*/
$CLFetchers->fetchLstDataDetail($Db,
                                $jobId,
                                $SourceDb->fetchValue("srcDbDtl"),
                                $nDetail,
                                $lstDetail);
?>

<html>
<title> View </title>

<? echo $GJs->includeThis(_TYPE_CSS, "/myMenu.css"); ?>

<body>

  <table border="1" class="dedeq">
  <tr>
  <th> Model </th><td> <?=$lstHeader["MODEL"][0] ?> </td>
  </tr>
  </table><br/>

  <table border="1" class="dedeq">
  <tr>
  <th> No       </th>
  <th> From     </th>
  <th> To       </th>
  <th> Qty      </th>
  </tr>
  <? for($iRow = 0; $iRow < $nDetail; $iRow++): ?>

  <tr>

  <td> <?=($iRow + 1) ?> </td>

  <td> <?=$lstDetail["UNIT_NAME"][$iRow] ?> </td>

  <td> <?=$lstDetail["UNIT_TO"][$iRow] ?> </td>

  <td> <?=$lstDetail["QTY"][$iRow] ?>   </td>

  </tr>
  <? endfor; ?>

  </table><br/>
</body>

</html>